// File Queue2.h: Header file for Queue ADT.  
// Class is templated.
#ifndef QUEUE2_H
#define QUEUE2_H


template <class ItemType>
struct NodeType;

template <class ItemType>
class QueType
{
public:
    QueType();
    // Class constructor.

    ~QueType();
    // Class destructor.

	QueType(const QueType<ItemType>& source);
	//copy constructor

	QueType operator =(const QueType<ItemType>& source);
	//assignment operator

    void MakeEmpty();
    // Function: Initializes the queue to an empty state.
    // Post: Queue is empty.

    bool IsEmpty() const;
    // Function: Determines whether the queue is empty.
    // Post: Function value = (queue is empty)

    bool IsFull() const;
    // Function: Determines whether the queue is full.
    // Post: Function value = (queue is full)

    bool Enqueue(ItemType newItem);
    // Function: Adds newItem to the rear of the queue.
    // Pre:  none
    // Post: returns false if queue is full
	//		 else newItem is at the rear of the queue and returns true

    bool Dequeue(ItemType& item);
    // Function: Removes front item from the queue and returns it in item.
    // Pre:  none
    // Post: returns false if queue is empty
	//		 else, front element has been removed from the queue,
    //       item is a copy of the removed element, and returns true



private:
    NodeType<ItemType>* qFront;
    NodeType<ItemType>* qRear;
};

#include "Queue2.cpp"


#endif